package nju.mscs.data.object;

import java.io.Serializable;

public class Date implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -3601209327221056405L;
	private int year=0;
	private int month=0;
	private int date=0;
	public Date(){};
	public Date(int y,int m,int d){
		setDate(d);
		setMonth(m);
		setYear(y);
	};
	public Date(String time){
		String[] t=time.split("/");
		setYear(Integer.parseInt(t[0]));
		setMonth(Integer.parseInt(t[1]));
		setDate(Integer.parseInt(t[2]));
	}
	public int getMonth() {
		return month;
	}
	public void setMonth(int month) {
		this.month = month;
	}
	public int getYear() {
		return year;
	}
	public void setYear(int year) {
		this.year = year;
	}
	public int getDate() {
		return date;
	}
	public void setDate(int date) {
		this.date = date;
	}
	public String print(){
		return year+"/"+month+"/"+date;
	}
}
